package com.idc.resource.dal.mapper;

import com.idc.resource.dal.dto.TUserRoleRelation;
import org.apache.ibatis.annotations.Param;

public interface TUserRoleRelationMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TUserRoleRelation record);

    int insertSelective(TUserRoleRelation record);

    TUserRoleRelation selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TUserRoleRelation record);

    int updateByPrimaryKey(TUserRoleRelation record);

    /**
     * 根据用户id和角色id 查询用户角色关系
     * @param userId 用户id
     * @param roleId 角色id
     * @return 用户角色关系
     */
    TUserRoleRelation selectByUserAndRole(@Param(value = "userId") Long userId,@Param(value = "roleId")  Long roleId);
}